package com.example.mine;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.example.mine.mvp.ui.activity.DynamicActivity;
import com.example.okhttputils.mvp.base.BaseFragment;
import com.example.okhttputils.mvp.base.BasePresenter;

/**
 * 创业
 */
@Route(path = "/mine/fragment")
public class MineFragment extends BaseFragment {
    private TextView textView;
    private TextView tvDynamic;
    @Autowired
    public String title;

    @Override
    protected void loadData() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.ac_mine;
    }

    @Override
    protected void initView() {
        ARouter.getInstance().inject(this);
        textView = rootView.findViewById(R.id.tv_title);
        tvDynamic = rootView.findViewById(R.id.tv_dynamic);
        textView.setText("创业");

    }

    @Override
    protected void addListener() {
        tvDynamic.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //startActivity(new Intent(getActivity(),DynamicActivity.class));
                ARouter.getInstance().build( "/com/dynamic")
                        .withString("user_id","10011").navigation();
            }
        });
    }

    @Override
    protected BasePresenter createPresenter() {
        return null;
    }


    public void setTitle(String title3) {
        this.title = title3;
    }
}
